package com.example.back.dao.topup;

import com.example.back.bean.topup.DiamondsToCardsInfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DiamondsToCardsDao {

    @Select("select * from diamonds_cards_config")
    List<DiamondsToCardsInfo> getDiamondsToCards();

    @Insert("insert into diamonds_cards_config (diamonds,cards)values(#{diamonds},#{cards})")
    int insertDiamondsToCards(int cards,int diamonds);

    @Update("update diamonds_cards_config set cards=#{cards},diamonds=#{diamonds} where id = #{id}")
    int updateDiamondsToCards(int id ,int cards, int diamonds);

    @Delete("delete from diamonds_cards_config where id = #{id}")
    int deleteDiamondsToCards(int id);
}
